package com.geekgo.step1;

/**
 * @author HeHaoyang
 * @version 2016/6/7 18:11
 */
public class Fruit<T> {
    private T info;

    public Fruit(){

    }
    public Fruit(T info) {
        this.info = info;
    }

    public T getInfo() {
        return info;
    }

    public void setInfo(T info) {
        this.info = info;
    }

    public static void main(String[] args) {
        Fruit<String> fruit = new Fruit<>("苹果");
        System.out.println(fruit.getInfo());
        Fruit<Integer> fruit1 = new Fruit<>(222);
        System.out.println(fruit1.getInfo());
    }
}
